package com.sqly.doc.menu.ycf;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.sqly.doc.R;
import com.sqly.doc.base.MyBaseActivity;
import com.sqly.doc.pojo.JuMin;

/**
 */

public class ycf_menu extends MyBaseActivity {
    LinearLayout l1, l2, l3, l4, l5, l6, l7, l8,back;
    TextView title, uname;
    Context con = ycf_menu.this;
    JuMin j;
    @Override
    protected void initUI() {
        setContentView(R.layout.ycf_menu);
        l1 = (LinearLayout) findViewById(R.id.l1);
        l2 = (LinearLayout) findViewById(R.id.l2);
        l3 = (LinearLayout) findViewById(R.id.l3);
        l4 = (LinearLayout) findViewById(R.id.l4);
        l5 = (LinearLayout) findViewById(R.id.l5);
        l6 = (LinearLayout) findViewById(R.id.l6);
        l7 = (LinearLayout) findViewById(R.id.l7);
        l8 = (LinearLayout) findViewById(R.id.l8);
        title = (TextView) findViewById(R.id.title);
        uname = (TextView) findViewById(R.id.uname);
        back = (LinearLayout) findViewById(R.id.back);
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }

    @Override
    protected void initData() {
        title.setText("孕产妇");
        uname.setText("");
        /*uname.setText(SharedPreferencesUtils.getParam(con, "uname", "请选择").toString());*/
    }

    @Override
    protected void initListener() {
       /* uname.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivityForResult(new Intent(con, choose_team.class).putExtra("cname", "ycf_menu.class"), 1);
            }
        });*/
        l1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
           /*     if (uname.getText().toString().equals("请选择")) {
                    MyToastUtil.ShowToast(con, "请先选择对应的用户");
                    startActivityForResult(new Intent(con, choose_team.class).putExtra("cname", "ycf_menu.class"), 1);
                } else*/
                    startActivity(new Intent(ycf_menu.this, ycf_list.class).putExtra("type","第1次产前检查服务"));
            }
        });
        l2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
              /*  if (uname.getText().toString().equals("请选择")) {
                    MyToastUtil.ShowToast(con, "请先选择对应的用户");
                    startActivityForResult(new Intent(con, choose_team.class).putExtra("cname", "ycf_menu.class"), 1);
                } else*/
                    startActivity(new Intent(ycf_menu.this, ycf_list.class).putExtra("type","第2次产前检查服务"));
            }
        });
        l3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
               /* if (uname.getText().toString().equals("请选择")) {
                    MyToastUtil.ShowToast(con, "请先选择对应的用户");
                    startActivityForResult(new Intent(con, choose_team.class).putExtra("cname", "ycf_menu.class"), 1);
                } else*/
                    startActivity(new Intent(ycf_menu.this, ycf_list.class).putExtra("type","第3次产前检查服务"));
            }
        });
        l4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
               /* if (uname.getText().toString().equals("请选择")) {
                    MyToastUtil.ShowToast(con, "请先选择对应的用户");
                    startActivityForResult(new Intent(con, choose_team.class).putExtra("cname", "ycf_menu.class"), 1);
                } else*/
                    startActivity(new Intent(ycf_menu.this, ycf_list.class).putExtra("type","第4次产前检查服务"));
            }
        });
        l5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
              /*  if (uname.getText().toString().equals("请选择")) {
                    MyToastUtil.ShowToast(con, "请先选择对应的用户");
                    startActivityForResult(new Intent(con, choose_team.class).putExtra("cname", "ycf_menu.class"), 1);
                } else*/
                    startActivity(new Intent(ycf_menu.this, ycf_list.class).putExtra("type","第5次产前检查服务"));
            }
        });
        l6.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
               /* if (uname.getText().toString().equals("请选择")) {
                    MyToastUtil.ShowToast(con, "请先选择对应的用户");
                    startActivityForResult(new Intent(con, choose_team.class).putExtra("cname", "ycf_menu.class"), 1);
                } else*/
                    startActivity(new Intent(ycf_menu.this, ycf_list.class).putExtra("type","产后访视记录"));
            }
        });
        l7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                /*if (uname.getText().toString().equals("请选择")) {
                    MyToastUtil.ShowToast(con, "请先选择对应的用户");
                    startActivityForResult(new Intent(con, choose_team.class).putExtra("cname", "ycf_menu.class"), 1);
                } else*/
                    startActivity(new Intent(ycf_menu.this, ycf_list.class).putExtra("type","产后42天健康检查记录"));
            }
        });


    }


}
